

    <!-- 自动完成输入框 30th Aug. 2018 By PP-->
    <!-- <script type="text/javascript" src="__STATIC__/plugs/autocompleter/js/jquery.min.js"></script> -->
    <!-- <script type="text/javascript" src="__STATIC__/plugs/autocompleter/js/jquery.autocompleter.js"></script> -->
    <!-- <script type="text/javascript" src="__STATIC__/plugs/autocompleter/js/main.js"></script> -->
    <!-- <link rel="stylesheet" href="__STATIC__/plugs/autocompleter/css/main.css?ver={:date('ymd')}"> -->
    <!-- <link rel="stylesheet" href="__STATIC__/plugs/autocompleter/css/normalize.css?ver={:date('ymd')}"> -->

    <script type="text/javascript" src="__STATIC__/admin/js/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" src="__STATIC__/admin/js/ueditor/ueditor.all.min.js"></script>

<form class="layui-form layui-box" style='padding:25px 30px 20px 0' action="{:url()}" data-auto="true" method="post">

<!--     <div class="layui-form-item">
        <label class="layui-form-label">用户账号</label>
        <div class="layui-input-block">
            {if $vo and isset($vo.username)}
            <input type="text" readonly="" disabled="" name="username" value='{$vo.username|default=""}' required="required" title="请输入用户名称" placeholder="请输入用户名称" class="layui-input disabled">
            {else/}
            <input type="text" name="username" value='{$vo.username|default=""}' required="required" title="请输入用户名称" placeholder="请输入用户名称" class="layui-input">
            {/if}
        </div>
    </div> -->

<!--     <div class="layui-form-item">
        <label class="layui-form-label">管理员</label>
        <div class="layui-input-block">
            <input type="text" autofocus name="admin_id" id="admin_id" value='{$vo.admin_id|default=""}' required="required" title="请输入用户名" placeholder="请输入用户名" class="layui-input">
        </div>
    </div> -->
    

    <div class="layui-form-item">
        <label class="layui-form-label">名称</label>
        <div class="layui-input-block">
            <input type="text" autofocus name="title" value='{$vo.title|default=""}' required="required" title="请输入名称" placeholder="请输入名称" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">英文名称</label>
        <div class="layui-input-block">
            <input type="text" autofocus name="english_title" value='{$vo.english_title|default=""}' title="请输入英文名称" placeholder="请输入英文名称" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">域名</label>
        <div class="layui-input-block">
            <input type="text" autofocus name="domain" value='{$vo.domain|default=""}' required="required" title="请输入域名" placeholder="请输入域名" class="layui-input">
        </div>
    </div>
    
    {if !empty($adminList)}
    <div class="layui-form-item">
        <label class="layui-form-label">管理员</label>
        <div class="layui-input-block">
            <select name='admin_id' required="required" title="请选择用户" class='layui-select full-width'>
                <option value="">请选择用户</option>
                {foreach $adminList as $menu}
                {eq name='menu.id' value='$vo.admin_id|default=0'}
                <option selected  value='{$menu.id}'>{$menu.username}({$menu.desc})</option>
                {else/}
                <option  value='{$menu.id}'>{$menu.username}({$menu.desc})</option>
                {/eq}
                {/foreach}
            </select>
        </div>
    </div>
    {/if}
    
    {if !empty($areaList)}
    <div class="layui-form-item">
        <label class="layui-form-label">地区</label>
        <div class="layui-input-block">
            <select name='zone_id' required="required" title="请选择地区" class='layui-select full-width'>
                <option value="">请选择地区</option>
                {foreach $areaList as $menu}
                {eq name='menu.area_id' value='$vo.zone_id|default=0'}
                <option selected  value='{$menu.area_id}'>{$menu.spl}{$menu.area_name}</option>
                {else/}
                <option  value='{$menu.area_id}'>{$menu.spl}{$menu.area_name}</option>
                {/eq}
                {/foreach}
            </select>
        </div>
    </div>
    {/if}
    
    {if !empty($tempList)}
    <div class="layui-form-item">
        <label class="layui-form-label">模板</label>
        <div class="layui-input-block">
            <select name='temp_id' required="required" title="请选择模板" class='layui-select full-width'>
                <option value="">请选择模板</option>
                {foreach $tempList as $menu}
                {eq name='menu.id' value='$vo.temp_id|default=0'}
                <option selected  value='{$menu.id}'>{$menu.spl}{$menu.title}</option>
                {else/}
                <option  value='{$menu.id}'>{$menu.spl}{$menu.title}</option>
                {/eq}
                {/foreach}
            </select>
        </div>
    </div>
    {/if}
    
    <!-- {if !empty($appList)}
    <div class="layui-form-item">
        <label class="layui-form-label">应用类型</label>
        <div class="layui-input-block">
            <select name='app_id' required="required" title="请选择应用类型" class='layui-select full-width'>
                <option value="">请选择应用类型</option>
                {foreach $appList as $menu}
                {eq name='menu.id' value='$vo.app_id|default=0'}
                <option selected  value='{$menu.id}'>{$menu.title}</option>
                {else/}
                <option  value='{$menu.id}'>{$menu.title}</option>
                {/eq}
                {/foreach}
            </select>
        </div>
    </div>
    {/if} -->
	
    <div class="layui-form-item">
        <label class="layui-form-label">联系人</label>
        <div class="layui-input-block">
            <input type="text" name="contact" value='{$vo.contact|default=""}' title="请输入联系人" placeholder="请输入联系人" class="layui-input">
        </div>
    </div>
    
    <div class="layui-form-item">
        <label class="layui-form-label">主办单位</label>
        <div class="layui-input-block">
            <input type="text" name="host" value='{$vo.host|default=""}' title="请输入主办单位" placeholder="请输入主办单位" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">承办单位</label>
        <div class="layui-input-block">
            <input type="text" name="chengban" value='{$vo.chengban|default=""}' title="请输入承办单位" placeholder="请输入承办单位" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">运营单位</label>
        <div class="layui-input-block">
            <input type="text" name="yunwei" value='{$vo.yunwei|default=""}' title="请输入运营单位" placeholder="请输入运营单位" class="layui-input" >
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">技术支持</label>
        <div class="layui-input-block">
            <input type="text" name="tech" value='{$vo.tech|default=""}' title="请输入技术支持" placeholder="请输入技术支持" class="layui-input" >
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">办公地址</label>
        <div class="layui-input-block">
            <input type="text" name="address" value='{$vo.address|default=""}' title="请输入办公地址" placeholder="请输入办公地址" class="layui-input" >
        </div>
    </div>
    
    <div class="layui-form-item">
        <label class="layui-form-label">咨询电话</label>
        <div class="layui-input-block">
            <input type="text" name="tel" value='{$vo.tel|default=""}' title="请输入咨询电话" placeholder="请输入咨询电话" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">电子邮箱</label>
        <div class="layui-input-block">
            <input type="text" name="email" value='{$vo.email|default=""}' title="请输入电子邮箱" placeholder="请输入电子邮箱" class="layui-input" >
        </div>
    </div>

    <!-- <div class="layui-form-item">
        <label class="layui-form-label">政府网站标识码</label>
        <div class="layui-input-block">
            <input type="text" name="biaozhima" value='{$vo.biaozhima|default=""}' title="请输入政府网站标识码" placeholder="请输入政府网站标识码" class="layui-input">
        </div>
    </div> -->

    <div class="layui-form-item">
        <label class="layui-form-label">ICP备案号</label>
        <div class="layui-input-block">
            <input type="text" name="icp_number" value='{$vo.icp_number|default=""}' title="请输入ICP备案号" placeholder="请输入ICP备案号" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">PC_LOGO</label>
        <div class='layui-input-block'>
            <img data-tips-image style="height:auto;max-height:32px;min-width:32px" src="{$vo.pc_logo|default='static/admin/theme/default/img/image.png'}"/>
            <input type="hidden" name="pc_logo" onchange="$(this).prev('img').attr('src', this.value)" value="{$vo.pc_logo|default=''}" class="layui-input">
            <a class="btn btn-link" data-file="one" data-type="png,jpg,jpeg" data-field="pc_logo">上传图片</a>
            <!-- <p>建议上传图片的尺寸为： (px)。</p> -->
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">PC_头部背景图</label>
        <div class='layui-input-block'>
            <img data-tips-image style="height:auto;max-height:32px;min-width:32px" src="{$vo.pc_head|default='static/admin/theme/default/img/image.png'}"/>
            <input type="hidden" name="pc_head" onchange="$(this).prev('img').attr('src', this.value)" value="{$vo.pc_head|default=''}" class="layui-input">
            <a class="btn btn-link" data-file="one" data-type="png,jpg,jpeg" data-field="pc_head">上传图片</a>
            <!-- <p>建议上传图片的尺寸为： (px)。</p> -->
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">PC_背景图</label>
        <div class='layui-input-block'>
            <img data-tips-image style="height:auto;max-height:32px;min-width:32px" src="{$vo.pc_bg|default='static/admin/theme/default/img/image.png'}"/>
            <input type="hidden" name="pc_bg" onchange="$(this).prev('img').attr('src', this.value)" value="{$vo.pc_bg|default=''}" class="layui-input">
            <a class="btn btn-link" data-file="one" data-type="png,jpg,jpeg" data-field="pc_bg">上传图片</a>
            <!-- <p>建议上传图片的尺寸为： (px)。</p> -->
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">PC_站点缩略图</label>
        <div class='layui-input-block'>
            <img data-tips-image style="height:auto;max-height:32px;min-width:32px" src="{$vo.thumb|default='static/admin/theme/default/img/image.png'}"/>
            <input type="hidden" name="thumb" onchange="$(this).prev('img').attr('src', this.value)" value="{$vo.thumb|default=''}" class="layui-input">
            <a class="btn btn-link" data-file="one" data-type="png,jpg,jpeg" data-field="thumb">上传图片</a>
            <!-- <p>建议上传图片的尺寸为： (px)。</p> -->
        </div>
    </div>

    <!-- <div class="layui-form-item">
        <label class="layui-form-label">微信二维码</label>
        <div class='layui-input-block'>
            <img data-tips-image style="height:auto;max-height:32px;min-width:32px" src="{$vo.qrcode|default='static/admin/theme/default/img/image.png'}"/>
            <input type="hidden" name="qrcode" onchange="$(this).prev('img').attr('src', this.value)" value="{$vo.qrcode|default=''}" class="layui-input">
            <a class="btn btn-link" data-file="one" data-type="png,jpg,jpeg" data-field="qrcode">上传图片</a>
            <p>建议上传图片的尺寸为： (px)。</p>
        </div>
    </div> -->

<!--     <div class="layui-form-item">
        <label class="layui-form-label">WAP_LOGO</label>
        <div class='layui-input-block'>
            <img data-tips-image style="height:auto;max-height:32px;min-width:32px" src="{$vo.wap_logo|default='static/admin/theme/default/img/image.png'}"/>
            <input type="hidden" name="wap_logo" onchange="$(this).prev('img').attr('src', this.value)" value="{$vo.wap_logo|default=''}" class="layui-input">
            <a class="btn btn-link" data-file="one" data-type="png,jpg,jpeg" data-field="wap_logo">上传图片</a>
            <p>建议上传广告图片的尺寸为： (px)。</p>
        </div>
    </div> -->
    
    <!-- {if empty($vo['id'])} -->
<!--     <div class="layui-form-item">
        <label class="layui-form-label">新的密码</label>
        <div class="layui-input-block">
            <input type="password" name="password" value='' pattern="^\S{1,}$" required=""  title="请输入新的密码" placeholder="请输入新的密码" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">重复密码</label>
        <div class="layui-input-block">
            <input type="password" name="repassword" value='' pattern="^\S{1,}$" required="" title="请输入重复密码" placeholder="请输入重复密码" class="layui-input">
        </div>
    </div> -->
    <!-- {/if} -->

    <div class="layui-form-item">
        <label class="layui-form-label">经度</label>
        <div class="layui-input-block">
            <input type="text" name="longitude" value='{$vo.longitude|default=""}' title="请输入经度" placeholder="请输入经度,如:100.236522" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">纬度</label>
        <div class="layui-input-block">
            <input type="text" name="latitude" value='{$vo.latitude|default=""}' title="请输入纬度" placeholder="请输入纬度,如:25.597605" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">描述</label>
        <div class="layui-input-block">
            <textarea placeholder="请输入描述" title="请输入描述" class="layui-textarea" name="desc">{$vo.desc|default=""}</textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">简介</label>
        <div class="layui-input-block">
            <!-- <textarea placeholder="请输入简介" title="请输入简介" class="layui-textarea" name="content">{$vo.content|default=""}</textarea> -->
            <script id="container" name="content" type="text/plain">
                这里是初始化内容
            </script>
        </div>
    </div>

    <div class="hr-line-dashed"></div>

    <div class="layui-form-item text-center">
        <input type="hidden" id="vocontent" value='{$vo.content|default=""}'>
        {if isset($vo['id'])}<input type='hidden' value='{$vo.id}' name='id'/>{/if}
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
    </div>

    <script>window.form.render();</script>
</form>

<script type="text/javascript">
        var ue = UE.getEditor('container');
        ue.ready(function() {
            ue.setHeight(300);
            //设置编辑器的内容
            // ue.setContent('hello');
            //获取html内容，返回: <p>hello</p>
            // var html = ue.getContent();
            //获取纯文本内容，返回: hello
            // var txt = ue.getContentTxt();

            var cont = $("#vocontent").val();
            // alert(cont);return false;
            ue.setContent(cont);
        });
    </script>

<!--     <script type="text/javascript">
    var data = [
    { "value": "1", "label": "one" },
    { "value": "2", "label": "two" },
    { "value": "3", "label": "three" }
];
$(function () {
    $('#admin_id').autocompleter({ source: '/admin/domain/_getAdminUs'  });
});
    </script> -->
